import java.util.Scanner;

public class 计算图形面积2 {
    public static void main(String[] args) {
        rectangle(3,5);
        square(9);
        triangle(5,5);
    }
    public static void rectangle(double a,double b) {
        Scanner scanner = new Scanner(System.in);
        double S = a * b;
        System.out.println(S);
    }
    public static void square(double h) {
        Scanner scanner = new Scanner(System.in);
        double S = h * h;
        System.out.println(S);

    }
    public static void triangle(double a,double h) {
        Scanner scanner = new Scanner(System.in);
        double S = 1 / 2 * a * h;
        System.out.println(S);
    }
}
